package com.gxa.eshop.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_goods")
@ApiModel("商品的pojo")
public class Goods implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "goods_id")
    @ApiModelProperty("商品的编号")
    private Long id;
    @Column(name = "goods_title")
    @ApiModelProperty("商品的名称")
    private String title;
    @Column(name = "goods_price")
    @ApiModelProperty("商品价格")
    private Double price;
    @Column(name = "status")
    @ApiModelProperty("商品价格")
    private Integer status;
    @Column(name = "goods_created")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") //CST
    @ApiModelProperty("商品的创建时间")
    private Date created;

}

